EspaƱol English

Introduction to CSS

CSS (Cascading Style Sheets) is a language used to define the appearance of HTML documents. It allows separating the structure of the content from its presentation, such as colors, fonts, margins, and more.

Basic CSS Example

Here is an example of basic CSS code:


<style>
    body {
        background-color: #f0f0f0;
        color: #333;
    }
    h1 {
        color: #d6336c;
    }
    p {
        font-size: 1.2em;
        line-height: 1.6;
    }
</style>

            

Code Explanation:

This CSS code modifies the style of the HTML document:

Browser Result

When this code is viewed in a browser, the result will be:

CSS Example Result

Useful Links

For more details about CSS features, you can visit the W3C CSS website.

Additionally, you might find the CSS Tutorial on W3Schools helpful.